<!--
 * @Author: zhoulei0232
 * @Date: 2021-06-17 10:39:42
 * @LastEditTime: 2021-07-21 17:52:47
 * @LastEditors: zhoulei0232
 * @Description: 
-->

<template>
  <div class="app-plus">
    <side-bar />

    <div class="content-box" :class="{ 'content-collapse': collapse }">
      <!-- <tags></tags> -->
      <head-bar />
      <div class="content">
        <router-view v-slot="{ Component }">
          <transition name="move" mode="out-in">
            <keep-alive :include="tagsList">
              <component :is="Component" />
            </keep-alive>
          </transition>
        </router-view>
      </div>
    </div>
  </div>
</template>

<script  lang="ts">
import { computed } from "vue";
import { useStore } from "vuex";
import HeadBar from "@/components/HeadBar.vue";
import SideBar from "@/components/SideBar.vue";
import Tags from "@/components/Tags.vue";

export default {
  components: { HeadBar, SideBar, Tags },
  name: "Home",
  setup() {
    const store = useStore();

    const tagsList = computed(() =>
      store.state.tagsList.map((item: any) => item.name)
    );
    const collapse = computed(() => store.state.collapse);
    return {};
  },
};
</script>

<style lang="scss" scoped>
</style>